package com.freedom.admin.domain.service.impl;

import com.freedom.admin.domain.repository.RoleRepository;
import com.freedom.admin.domain.service.RoleService;
import com.freedom.admin.infrastructure.persistence.pojo.bo.RoleBO;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
@RequiredArgsConstructor
public class RoleServiceImpl implements RoleService {

    private final RoleRepository roleRepository;

    @Override
    public void add(RoleBO roleBO) {
        roleRepository.add(roleBO);
    }

    @Override
    public void modifyRole(RoleBO roleBO) {
        roleRepository.modifyRole(roleBO);
    }

    @Override
    public void removeRoles(List<Integer> roleIds) {
        roleRepository.removeRoles(roleIds);
    }

    @Override
    public void modifyRoleStatus(RoleBO roleBO) {
        roleRepository.modifyRoleStatus(roleBO);
    }
}
